package v1

import (
	"devops-super/api"
	"devops-super/internal/model/mymodel"
	"github.com/gogf/gf/v2/frame/g"
)

// AlertPeopleMsgGetPageLstReq 分页获取告警通知日志列表请求
type AlertPeopleMsgGetPageLstReq struct {
	g.Meta `method:"get" path:"/alert-people-msg/page-list" summary:"分页获取告警通知日志列表" tags:"告警通知日志"`
	*api.PageLstReq
	AlertLogId uint64   `json:"alertLogId" description:"告警日志id"`
	PeopleId   int64    `json:"peopleId" description:"人员id"`
	NoticeType string   `json:"noticeType" description:"通知方法 sms email"`
	Status     string   `json:"status" description:"通知状态 1ok -1失败 0通知中"`
	TimeRange  []string `json:"timeRange" description:"时间范围[开始,结束]"`
	DeptId     int64    `json:"deptId" description:"部门id"`
}

// AlertPeopleMsgGetPageLstRes 获取告警通知日志列表响应
type AlertPeopleMsgGetPageLstRes struct {
	*api.PageLstRes[*mymodel.AlertPeopleMsgResponse] // 使用泛型响应结构体
}

// AlertPeopleMsgAddReq 新增告警通知日志请求
type AlertPeopleMsgAddReq struct {
	g.Meta `method:"post" path:"/alert-people-msg" summary:"新增告警通知日志" tags:"告警通知日志"`
	*mymodel.AlertPeopleMsg
}

// AlertPeopleMsgAddRes 新增告警通知日志响应
type AlertPeopleMsgAddRes struct{}

// AlertPeopleMsgUptReq 更新告警通知日志请求
type AlertPeopleMsgUptReq struct {
	g.Meta `method:"put" path:"/alert-people-msg/{id}" summary:"更新告警通知日志" tags:"告警通知日志"`
	Id     int64 `v:"min:1#通知日志ID必须" path:"id"`
	*mymodel.AlertPeopleMsg
}

// AlertPeopleMsgUptRes 更新告警通知日志响应
type AlertPeopleMsgUptRes struct{}

// AlertPeopleMsgUptStatusReq 更新告警通知日志状态请求
type AlertPeopleMsgUptStatusReq struct {
	g.Meta    `method:"patch" path:"/alert-people-msg/{id}/status" summary:"更新告警通知日志状态" tags:"告警通知日志"`
	Id        int64  `v:"min:1#通知日志ID必须" path:"id"`
	Status    int    `v:"required" json:"status"`
	StatusMsg string `json:"statusMsg" description:"状态消息"`
}

// AlertPeopleMsgUptStatusRes 更新告警通知日志状态响应
type AlertPeopleMsgUptStatusRes struct{}

// AlertPeopleMsgDelReq 删除告警通知日志请求
type AlertPeopleMsgDelReq struct {
	g.Meta `method:"delete" path:"/alert-people-msg/{id}" summary:"删除告警通知日志" tags:"告警通知日志"`
	Id     int64 `v:"min:1#通知日志ID必须" path:"id"`
}

// AlertPeopleMsgDelRes 删除告警通知日志响应
type AlertPeopleMsgDelRes struct{}

// AlertPeopleMsgGetOneReq 获取单条告警通知日志请求
type AlertPeopleMsgGetOneReq struct {
	g.Meta `method:"get" path:"/alert-people-msg/getOne" summary:"获取单条告警通知日志" tags:"告警通知日志"`
	Id     int64 `v:"min:1#通知日志ID必须" path:"id"`
}

// AlertPeopleMsgGetOneRes 获取单条告警通知日志响应
type AlertPeopleMsgGetOneRes struct {
	Info *mymodel.AlertPeopleMsgResponse `json:"info"`
}

// AlertPeopleMsgGetOptionsReq 获取表单选项请求
type AlertPeopleMsgGetOptionsReq struct {
	g.Meta     `method:"get" path:"/alert-people-msg/getOptions" summary:"获取告警通知日志选项" tags:"告警通知日志"`
	FieldKey   string `json:"fieldKey"`   //明确指出key的字段
	FieldLabel string `json:"fieldLabel"` //明确指出label的字段
}

// AlertPeopleMsgGetOptionsRes 获取表单选项响应
type AlertPeopleMsgGetOptionsRes struct {
	Options []*api.FormOptionsItem `json:"options"`
}

// AlertPeopleMsgBatchDelReq 批量删除告警通知日志请求
type AlertPeopleMsgBatchDelReq struct {
	g.Meta `method:"delete" path:"/alert-people-msg/batch-del" summary:"批量删除告警通知日志" tags:"告警通知日志"`
	Ids    []int64 `v:"required#请选择要删除的通知日志" json:"ids"`
}

// AlertPeopleMsgBatchDelRes 批量删除告警通知日志响应
type AlertPeopleMsgBatchDelRes struct{}
